import http from "@/utils/http";

//登录接口
export const postLoginWxMin = (data) => {
    return http({
        url: "/login/wxMin",
        method: "post",
        data,
    })
}

//小程序内测接口
export const postTestLoginWxMin = (phoneNumber) => {
    return http({
        url: "/login/wxMin/simple",
        method: "post",
        data: { phoneNumber }
    })
}

//获取个人信息
export const getMemberProfile = () => {
    return http({
        url: "/member/profile"
    })
}

//修改头像
export const postMemberProfileAvatar = (filePath) => {
    return uni.uploadFile({
        url: "/member/profile/avatar",
        filePath,
        name: "file"
    })
}

//修改个人信息
export const putMemberProfile = (data) => {
    return http({
        url: "/member/profile",
        method: "put",
        data
    })
}